package com.gxa.dr2.service.impl;

import com.gxa.dr2.dto.Response;
import com.gxa.dr2.dto.ResultDTO;
import com.gxa.dr2.mapper.RoleMapper;
import com.gxa.dr2.pojo.Role;
import com.gxa.dr2.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;


    /**
     * 获取所有的角色
     *
     * @return
     */
    @Override
    public ResultDTO allData() {
        List<Role> all = roleMapper.findAll();
        return Response.success(all);
    }
}
